package a.f;

import a.d.*;
import a.d.s;
import a.d.t;
import a.d.w;
import a.d.y;

public class id
  implements xb
{
  public static final byte a = 0;
  public static final byte b = 1;
  public static final byte c = 2;
  private static final double d = 5.0D;
  private static final double e = 0.0001D;
  private static final double f = 1.0E-006D;
  private static final byte g = 0;
  private static final byte h = 1;
  private static final byte i = 2;
  private static final byte j = 3;
  private double k = 5.0D;
  private boolean l = true;
  private boolean m = true;
  private boolean n = false;
  private double o = 0.0D;
  private byte p;
  private static final a.d.z q = new a.d.z(1.0D, 0.0D);
  public static boolean r;
  
  public id(byte paramByte)
  {
    this.p = paramByte;
  }
  
  public byte b()
  {
    return this.p;
  }
  
  public boolean c()
  {
    return this.l;
  }
  
  public void a(boolean paramBoolean)
  {
    this.l = paramBoolean;
  }
  
  public double d()
  {
    return this.k;
  }
  
  public void a(double paramDouble)
  {
    this.k = paramDouble;
  }
  
  public boolean e()
  {
    return this.m;
  }
  
  public void b(boolean paramBoolean)
  {
    this.m = paramBoolean;
  }
  
  public boolean f()
  {
    return this.n;
  }
  
  public void c(boolean paramBoolean)
  {
    this.n = paramBoolean;
  }
  
  public double g()
  {
    return this.o;
  }
  
  public void b(double paramDouble)
  {
    this.o = paramDouble;
  }
  
  public Object a()
  {
    return new a_(0, 0.0D, false);
  }
  
  public a.d.o a(s params, zb paramzb, zc paramzc1, zc paramzc2, Object paramObject)
  {
    boolean bool2 = o.eg;
    int i3 = o.dg;
    if (!bool2) {}
    a_ locala_ = paramObject != null ? (a_)paramObject : (a_)a();
    int i1 = locala_.a();
    double d1 = locala_.b();
    boolean bool1 = locala_.c();
    a.d.o localo1 = new a.d.o(new w(0.0D, 0.0D), params);
    localo1.a(6.283185307179586D - this.o);
    y localy = wc.a(paramzb, paramzc1, paramzc2, 0.0D);
    if (!bool2)
    {
      if (localy.j() >= 2)
      {
        if (bool2) {
          break label266;
        }
        if (localy.j() != 2) {
          break label264;
        }
        if (bool2) {
          break label266;
        }
        if (w.a(localy.d(), localy.e()) >= 0.0001D) {
          break label264;
        }
      }
      if (bool2) {}
    }
    else if (localy.j() < 2)
    {
      localObject1 = localo1.a();
      localo1.g(paramzc1.a() + ((t)localObject1).a * 0.5D, paramzc1.b() + ((t)localObject1).b * 0.5D);
      if (bool2) {
        break label247;
      }
      if (i3 == 0) {
        break label243;
      }
    }
    Object localObject1 = localy.d();
    localo1.g(((w)localObject1).a, ((w)localObject1).b);
    label243:
    label247:
    if ((bool2) || (f())) {
      wc.b(localo1);
    }
    return localo1;
    label264:
    label266:
    if (!bool2) {
      if (i1 < 0)
      {
        i2 = Math.max(0, localy.j() - 1 + i1);
        if ((!bool2) && (i3 == 0)) {
          break label314;
        }
      }
    }
    int i2 = Math.min(localy.j() - 2, i1);
    label314:
    n localn = localy.a(i2);
    if (!bool2) {
      if (localn == null)
      {
        localObject2 = localo1.a();
        if (!bool2)
        {
          localo1.g(paramzc1.a() + ((t)localObject2).a * 0.5D, paramzc1.b() + ((t)localObject2).b * 0.5D);
          if (f()) {
            wc.b(localo1);
          }
        }
        return localo1;
      }
    }
    Object localObject2 = localn.d();
    w localw1 = localn.e();
    if (!bool2) {
      if (localn.h() == 0.0D)
      {
        d2 = paramzc1.a() + paramzc1.c() * 0.5D + paramzb.c().a - (paramzc2.a() + paramzc2.c() * 0.5D + paramzb.d().a);
        double d3 = paramzc1.b() + paramzc1.d() * 0.5D + paramzb.c().b - (paramzc2.b() + paramzc2.d() * 0.5D + paramzb.d().b);
        if (!bool2) {
          if (d2 == 0.0D)
          {
            if (bool2) {
              break label607;
            }
            if (d3 == 0.0D)
            {
              localw1 = new w(((w)localObject2).a + 1.0E-006D, ((w)localObject2).b);
              if (i3 == 0) {
                break label652;
              }
            }
          }
        }
        label607:
        double d4 = Math.sqrt(d2 * d2 + d3 * d3);
        localw1 = new w(((w)localObject2).a + 1.0E-006D * d2 / d4, ((w)localObject2).b + 1.0E-006D * d3 / d4);
        label652:
        localn = new n((w)localObject2, localw1);
      }
    }
    if (this.m) {
      localo1.a(c(a.d.z.d(localn.i(), q) - this.o));
    }
    double d2 = 0.0D;
    if ((bool2) || (this.p != 0)) {
      d2 = bool1 ? -this.k : this.k;
    }
    a.d.o localo2 = new a.d.o(localo1);
    if ((bool2) || (i2 == 0)) {
      if (!bool2)
      {
        if (a(paramzc1, (w)localObject2, 5.0D))
        {
          if (bool2) {
            break label794;
          }
          b(localo2, localn, paramzc1, d2);
        }
      }
      else {
        if (i3 == 0) {
          break label801;
        }
      }
    }
    label794:
    a(localo2, localn, (w)localObject2, d2);
    label801:
    a.d.o localo3 = new a.d.o(localo1);
    if ((bool2) || (i2 >= localy.j() - 2)) {
      if (!bool2)
      {
        if (a(paramzc2, localw1, 5.0D))
        {
          if (bool2) {
            break label874;
          }
          a(localo3, localn, paramzc2, d2);
        }
      }
      else {
        if (i3 == 0) {
          break label881;
        }
      }
    }
    label874:
    a(localo3, localn, localw1, d2);
    label881:
    w localw2 = new w(localo2.d() * (1.0D - d1) + localo3.d() * d1, localo2.e() * (1.0D - d1) + localo3.e() * d1);
    if (!bool2)
    {
      localo1.a(localw2);
      if (f()) {
        wc.b(localo1);
      }
    }
    return localo1;
  }
  
  public a.c.z a(wb paramwb, zb paramzb, zc paramzc1, zc paramzc2)
  {
    boolean bool = o.eg;
    int i3 = o.dg;
    a.c.z localz = new a.c.z();
    w[] arrayOfw = wc.a(paramzb, paramzc1, paramzc2, 0.0D).h();
    if (!bool)
    {
      if (arrayOfw.length >= 2) {
        if (bool) {
          break label197;
        }
      }
    }
    else
    {
      if (arrayOfw.length != 2) {
        break label196;
      }
      if (bool) {
        break label197;
      }
      if (w.a(arrayOfw[0], arrayOfw[1]) >= 0.0001D) {
        break label196;
      }
    }
    a.d.o localo1 = new a.d.o(paramwb.d());
    if (!bool)
    {
      if (arrayOfw.length < 2) {
        localo1.g(paramzc1.a() + localo1.g() * 0.5D, paramzc1.b() - localo1.h() * 0.5D);
      }
    }
    else
    {
      if (bool) {
        break label192;
      }
      if (i3 == 0) {
        break label172;
      }
    }
    localo1.g(arrayOfw[0].a, arrayOfw[0].b);
    label172:
    label192:
    localz.add(new gc(localo1, a(), paramwb, false));
    return localz;
    label196:
    label197:
    int i1 = 0;
    label415:
    label460:
    label765:
    do
    {
      if (i1 >= arrayOfw.length - 1) {
        break;
      }
      w localw1 = arrayOfw[i1];
      w localw2 = arrayOfw[(i1 + 1)];
      if (localw1.equals(localw2))
      {
        double d1 = paramzc1.a() + paramzc1.c() * 0.5D + paramzb.c().a - (paramzc2.a() + paramzc2.c() * 0.5D + paramzb.d().a);
        double d3 = paramzc1.b() + paramzc1.d() * 0.5D + paramzb.c().b - (paramzc2.b() + paramzc2.d() * 0.5D + paramzb.d().b);
        if (!bool) {
          if (d1 == 0.0D)
          {
            if (bool) {
              break label415;
            }
            if (d3 == 0.0D)
            {
              localw2 = new w(localw1.a + 0.0001D, localw1.b);
              if (i3 == 0) {
                break label460;
              }
            }
          }
        }
        d4 = Math.sqrt(d1 * d1 + d3 * d3);
        localw2 = new w(localw1.a + 0.0001D * d1 / d4, localw1.b + 0.0001D * d3 / d4);
      }
      n localn = new n(localw1, localw2);
      double d2 = 6.283185307179586D - this.o;
      if (!bool) {
        if (this.m) {
          d2 = c(a.d.z.d(localn.i(), q) - this.o);
        }
      }
      int i2 = (bool) || (i1 > (arrayOfw.length - 2) / 2) ? i1 + 1 - arrayOfw.length : i1;
      if (!bool) {}
      double d4 = this.p == 0 ? 0.0D : this.k;
      a.d.o localo3 = new a.d.o(paramwb.d());
      localo3.a(d2);
      if ((bool) || (i1 == 0)) {
        if (!bool)
        {
          if (a(paramzc1, localw1, 5.0D))
          {
            if (bool) {
              break label645;
            }
            b(localo3, localn, paramzc1, d4);
          }
        }
        else {
          if (i3 == 0) {
            break label652;
          }
        }
      }
      a(localo3, localn, localw1, d4);
      a_ locala_2 = new a_(i2, 0.0D, false);
      localz.add(new gc(localo3, locala_2, paramwb));
      a.d.o localo4 = new a.d.o(paramwb.d());
      localo4.a(d2);
      if ((bool) || (i1 == arrayOfw.length - 2)) {
        if (!bool)
        {
          if (a(paramzc2, localw2, 5.0D))
          {
            if (bool) {
              break label765;
            }
            a(localo4, localn, paramzc2, d4);
          }
        }
        else {
          if (i3 == 0) {
            break label772;
          }
        }
      }
      a(localo4, localn, localw2, d4);
      a_ locala_3 = new a_(i2, 1.0D, false);
      localz.add(new gc(localo4, locala_3, paramwb));
      a(localz, paramwb, localo3, localo4, localn, i1, false);
      if (!bool)
      {
        if (this.p == 1)
        {
          a.d.o localo2 = new a.d.o(paramwb.d());
          localo2.a(d2);
          if ((bool) || (i1 == 0)) {
            if (!bool)
            {
              if (a(paramzc1, localw1, 5.0D))
              {
                if (bool) {
                  break label910;
                }
                b(localo2, localn, paramzc1, -this.k);
              }
            }
            else {
              if (i3 == 0) {
                break label920;
              }
            }
          }
          a(localo2, localn, localw1, -this.k);
          a_ locala_1 = new a_(i2, 0.0D, true);
          localz.add(new gc(localo2, locala_1, paramwb));
          localo3 = new a.d.o(paramwb.d());
          localo3.a(d2);
          if ((bool) || (i1 == arrayOfw.length - 2)) {
            if (!bool)
            {
              if (a(paramzc2, localw2, 5.0D)) {
                a(localo3, localn, paramzc2, -this.k);
              }
            }
            else
            {
              if (bool) {
                break label1076;
              }
              if (i3 == 0) {
                break label1046;
              }
            }
          }
          a(localo3, localn, localw2, -this.k);
          locala_2 = new a_(i2, 1.0D, true);
          localz.add(new gc(localo3, locala_2, paramwb));
          a(localz, paramwb, localo2, localo3, localn, i2, true);
        }
        i1++;
      }
    } while (i3 == 0);
    label645:
    label652:
    label910:
    label920:
    label1076:
    return localz;
  }
  
  private void a(a.c.z paramz, wb paramwb, a.d.o paramo1, a.d.o paramo2, n paramn, int paramInt, boolean paramBoolean)
  {
    boolean bool = o.eg;
    int i7 = o.dg;
    w[] arrayOfw1 = a.d.o.a(paramo1);
    int i1 = b(arrayOfw1, paramn);
    w localw1 = i1 > 0 ? arrayOfw1[(i1 - 1)] : arrayOfw1[3];
    n localn1 = new n(arrayOfw1[i1], localw1);
    w localw2 = i1 < 3 ? arrayOfw1[(i1 + 1)] : arrayOfw1[0];
    n localn2 = new n(arrayOfw1[i1], localw2);
    w[] arrayOfw2 = a.d.o.a(paramo2);
    w localw3 = a(arrayOfw2[i1], localn1, arrayOfw1[i1]);
    double d1 = w.a(arrayOfw1[i1], localw3);
    int i2 = (int)Math.floor((d1 - localn2.h()) / localn2.h());
    w localw4 = a(arrayOfw2[i1], localn2, arrayOfw1[i1]);
    double d2 = w.a(arrayOfw1[i1], localw4);
    int i3 = (int)Math.floor((d2 - localn1.h()) / localn1.h());
    if (!bool) {}
    int i4 = i2 >= i3 ? 1 : 0;
    double d3 = i4 != 0 ? d1 : d2;
    n localn3 = i4 != 0 ? localn1 : localn2;
    n localn4 = i4 != 0 ? localn2 : localn1;
    if (!bool) {}
    int i5 = i4 != 0 ? i2 : i3;
    if ((bool) || ((i5 > 0) && (i5 % 2 == 0))) {
      i5++;
    }
    double d4 = (d3 - (i5 + 1) * localn4.h()) / (i5 + 1);
    a.d.z localz1 = paramn.i();
    localz1.c();
    a.d.z localz2 = localn4.i();
    localz2.c();
    localz2.b(d4 + localn4.h());
    w localw5 = a.d.z.a(paramo1.c(), localz2);
    w localw6 = a(localw5, localn3, paramo1.c(), paramn);
    if (!bool)
    {
      if (localw6 == null) {
        localw6 = localw5;
      }
      localz1.b(w.a(paramo1.c(), localw6));
    }
    Object localObject1 = paramo1.c();
    double d5 = w.a(paramo1.c(), paramo2.c());
    int i6;
    if ((bool) || (i5 > 0)) {
      i6 = 0;
    }
    while (i6 < i5)
    {
      Object localObject2 = new a.d.o(paramo1);
      Object localObject3 = a.d.z.a((w)localObject1, localz1);
      double d6 = w.a(paramo1.c(), (w)localObject3);
      ((a.d.o)localObject2).a((w)localObject3);
      a_ locala_ = new a_(paramInt, d6 / d5, paramBoolean);
      paramz.add(new gc((a.d.o)localObject2, locala_, paramwb));
      localObject1 = localObject3;
      i6++;
      if (i7 != 0)
      {
        a.d.o localo = new a.d.o(paramo1);
        localObject2 = w.d(paramo2.l(), paramo1.l());
        localo.b((w)localObject2);
        localObject3 = new a_(paramInt, 0.5D, paramBoolean);
        paramz.add(new gc(localo, localObject3, paramwb));
      }
    }
  }
  
  private static boolean a(zc paramzc, w paramw, double paramDouble)
  {
    boolean bool = o.eg;
    if (((bool) || (paramzc.a() - paramDouble < paramw.a)) && ((bool) || (paramzc.a() + paramzc.c() + paramDouble > paramw.a)) && ((bool) || (paramzc.b() - paramDouble < paramw.b))) {
      if (bool) {}
    }
    return paramzc.b() + paramzc.d() + paramDouble > paramw.b;
  }
  
  public Object a(a.d.o paramo, zb paramzb, zc paramzc1, zc paramzc2)
  {
    boolean bool = o.eg;
    if (wc.a(paramo)) {
      throw new IllegalArgumentException("Invalid label bounds: " + paramo);
    }
    mc localmc = new mc();
    localmc.a(paramo);
    a.c.z localz = a(localmc, paramzb, paramzc1, paramzc2);
    if (!bool) {
      if (localz.isEmpty()) {
        return a();
      }
    }
    fc localfc = ob.a(localz, paramo.l());
    if (!bool) {}
    return localfc != null ? localfc.c() : a();
  }
  
  private static double c(double paramDouble)
  {
    boolean bool = o.eg;
    int i1 = o.dg;
    if (!bool) {
      if (paramDouble >= 0.0D) {}
    }
    do
    {
      for (paramDouble += 6.283185307179586D; i1 == 0; paramDouble -= 6.283185307179586D)
      {
        if (paramDouble <= 6.283185307179586D) {
          break;
        }
        if (i1 != 0) {
          break label51;
        }
      }
    } while (bool);
    label51:
    return paramDouble;
  }
  
  private static byte a(n paramn)
  {
    boolean bool = o.eg;
    double d1 = a.d.z.d(paramn.i(), q);
    if (!bool) {
      if (d1 >= 0.7853981633974483D)
      {
        if (bool) {
          break label46;
        }
        if (d1 < 2.356194490192345D) {
          return 0;
        }
      }
    }
    label46:
    if (!bool) {
      if (d1 >= 2.356194490192345D)
      {
        if (bool) {
          break label72;
        }
        if (d1 < 3.926990816987241D) {
          return 2;
        }
      }
    }
    label72:
    if (!bool) {
      if (d1 >= 3.926990816987241D)
      {
        if (bool) {
          break label94;
        }
        if (d1 < 5.497787143782138D) {
          return 1;
        }
      }
    }
    label94:
    return 3;
  }
  
  private static byte b(n paramn)
  {
    boolean bool = o.eg;
    double d1 = a.d.z.d(paramn.i(), q);
    if (!bool) {
      if (d1 >= 0.7853981633974483D)
      {
        if (bool) {
          break label60;
        }
        if (d1 < 2.356194490192345D)
        {
          if (!bool) {
            if (d1 <= 1.570796326794897D) {
              return 3;
            }
          }
          return 2;
        }
      }
    }
    label60:
    if (!bool) {
      if (d1 >= 2.356194490192345D)
      {
        if (bool) {
          break label100;
        }
        if (d1 < 3.926990816987241D)
        {
          if (!bool) {
            if (d1 <= 3.141592653589793D) {
              return 0;
            }
          }
          return 1;
        }
      }
    }
    label100:
    if (!bool) {
      if (d1 >= 3.926990816987241D)
      {
        if (bool) {
          break label140;
        }
        if (d1 < 5.497787143782138D)
        {
          if (!bool) {
            if (d1 <= 4.71238898038469D) {
              return 2;
            }
          }
          return 3;
        }
      }
    }
    label140:
    if (!bool) {
      if (d1 <= 3.141592653589793D) {
        return 0;
      }
    }
    return 1;
  }
  
  private void a(a.d.o paramo, n paramn, w paramw, double paramDouble)
  {
    boolean bool = o.eg;
    int i2 = o.dg;
    if (!bool)
    {
      if (0 == b()) {
        paramo.g(paramw.a, paramw.b);
      }
    }
    else if (i2 == 0) {
      return;
    }
    a.d.z localz1 = a.d.z.c(paramn.i());
    if ((bool) || (this.l))
    {
      if (!bool)
      {
        if (e(paramDouble))
        {
          localz1 = new a.d.z(-localz1.a(), -localz1.b());
          if (bool) {
            break label222;
          }
        }
      }
      else if (i2 == 0) {}
    }
    else
    {
      double d1 = a.d.z.d(q, localz1);
      if (!bool) {
        if (d1 == 6.283185307179586D) {
          d1 = 0.0D;
        }
      }
      if (((!bool) && ((d1 >= 3.141592653589793D) && ((!bool) && (e(paramDouble))))) || ((bool) || ((d1 < 3.141592653589793D) && (d(paramDouble))))) {
        localz1 = new a.d.z(-localz1.a(), -localz1.b());
      }
    }
    localz1.b(Math.abs(paramDouble) + paramo.g() + paramo.h());
    label222:
    w localw = a.d.z.a(paramw, localz1);
    paramo.g(localw.a, localw.b);
    w[] arrayOfw = a.d.o.a(paramo);
    double d2 = 1.7976931348623157E+308D;
    int i1 = 0;
    do
    {
      if (i1 >= arrayOfw.length) {
        break;
      }
      d2 = Math.min(d2, a(paramn, arrayOfw[i1]));
      i1++;
      if ((!bool) && (i2 != 0)) {
        return;
      }
    } while (i2 == 0);
    a.d.z localz2 = new a.d.z(-localz1.a(), -localz1.b());
    localz2.c();
    localz2.b(d2 - Math.abs(paramDouble));
    localw = a.d.z.a(localw, localz2);
    if (!bool) {
      paramo.g(localw.a, localw.b);
    }
  }
  
  private void a(a.d.o paramo, n paramn, zc paramzc, double paramDouble)
  {
    a(paramo, paramn.e(), paramn.d(), paramzc, false, paramDouble);
  }
  
  private void b(a.d.o paramo, n paramn, zc paramzc, double paramDouble)
  {
    a(paramo, paramn.d(), paramn.e(), paramzc, true, paramDouble);
  }
  
  private void a(a.d.o paramo, w paramw1, w paramw2, zc paramzc, boolean paramBoolean, double paramDouble)
  {
    boolean bool = o.eg;
    t localt1 = new t(paramzc.a(), paramzc.b(), paramzc.c(), paramzc.d());
    n localn = new n(paramw1, paramw2);
    byte b1 = a(localn);
    w localw1 = a(b1, localn, paramo, paramzc, paramBoolean, paramDouble);
    paramo.a(localw1);
    double d1 = lb.a(localt1, paramo);
    t localt2 = paramo.a();
    if (((bool) || (Math.abs(paramw1.a - paramw2.a) > 0.0001D)) && ((bool) || (Math.abs(paramw1.b - paramw2.b) > 0.0001D)) && ((bool) || ((d1 < 2.5D) || ((bool) || (d1 > 6.0D)))))
    {
      if (!bool) {
        if (b1 != 0)
        {
          if (bool) {
            break label272;
          }
          if (b1 != 1) {
            break label264;
          }
        }
      }
      if (!bool) {
        if (paramw2.a >= localt1.d() - 5.0D - localt2.a * 0.5D)
        {
          if (bool) {
            break label357;
          }
          if (paramw2.a <= localt1.d() + localt1.b() + 5.0D + localt2.a * 0.5D)
          {
            label264:
            if (!bool) {
              if (b1 != 2) {
                label272:
                if ((!bool) && (b1 != 3)) {
                  break label360;
                }
              }
            }
            if (bool) {
              break label357;
            }
            if (paramw2.b >= localt1.e() - 5.0D - localt2.b * 0.5D) {
              if (bool) {
                break label357;
              }
            }
          }
        }
      }
    }
    label357:
    label360:
    int i1 = paramw2.b > localt1.e() + localt1.c() + 5.0D + localt2.b * 0.5D ? 1 : 0;
    if ((bool) || (i1 != 0))
    {
      byte b2 = b(localn);
      w localw2 = a(b2, localn, paramo, paramzc, paramBoolean, paramDouble);
      paramo.a(localw2);
      double d2 = lb.a(localt1, paramo);
      if (((!bool) && (d2 < 2.5D)) || ((bool) || ((d2 > d1) && (d1 > 2.5D)))) {
        paramo.a(localw1);
      }
    }
  }
  
  private w a(byte paramByte, n paramn, a.d.o paramo, zc paramzc, boolean paramBoolean, double paramDouble)
  {
    boolean bool2 = o.eg;
    int i2 = o.dg;
    if (!bool2) {}
    int i1 = 0 == b() ? 1 : 0;
    a.d.o localo = new a.d.o(paramo);
    w localw1 = paramn.d();
    w localw2 = paramn.e();
    double d1 = a.d.z.d(paramn.i(), q);
    t localt = localo.a();
    label138:
    label139:
    boolean bool1;
    label209:
    label210:
    label216:
    double d2;
    double d3;
    w localw4;
    w localw5;
    double d4;
    if (!bool2) {
      if (paramByte == 0)
      {
        if (!bool2) {
          if (this.l)
          {
            if (!bool2) {
              if (paramBoolean)
              {
                if (bool2) {
                  break label139;
                }
                if (e(paramDouble)) {
                  break label138;
                }
              }
            }
            if ((bool2) || (!paramBoolean)) {
              if (bool2) {}
            }
            bool1 = d(paramDouble);
            if ((!bool2) && (i2 == 0)) {
              break label216;
            }
          }
        }
        if (!bool2) {
          if (d(paramDouble))
          {
            if (bool2) {
              break label210;
            }
            if (d1 <= 1.570796326794897D) {
              break label209;
            }
          }
        }
        if ((bool2) || (e(paramDouble))) {
          if (bool2) {}
        }
        bool1 = d1 > 1.570796326794897D;
        d2 = paramzc.b() - 5.0D - localt.c() * 0.5D;
        if (!bool2) {
          if (d2 < localw2.b) {
            d2 = localw2.b;
          }
        }
        d3 = bool1 ? Math.min(localw1.a, localw2.a) - localt.a : Math.max(localw1.a, localw2.a) + localt.a;
        if (!bool2) {
          localo.g(d3, d2);
        }
        localw4 = i1 != 0 ? localo.l() : a(a.d.o.a(localo), paramn);
        localw5 = a(paramn, localw4, 1.0D, 0.0D);
        localo.f(localw5.a - localw4.a, 0.0D);
        if (bool2) {
          break label1461;
        }
        if (i1 != 0) {
          break label1435;
        }
        d4 = a(paramn, new a.d.z(1.0D, 0.0D), Math.abs(paramDouble));
        if (!bool2)
        {
          if (bool1) {
            d4 = -d4;
          }
          localo.f(d4, 0.0D);
        }
        if (bool2) {
          break label1461;
        }
        if (i2 == 0) {
          break label1435;
        }
      }
    }
    if (!bool2) {
      if (paramByte == 1)
      {
        if (!bool2) {
          if (this.l)
          {
            if (!bool2) {
              if (paramBoolean)
              {
                if (bool2) {
                  break label507;
                }
                if (d(paramDouble)) {
                  break label506;
                }
              }
            }
            if ((bool2) || (!paramBoolean)) {
              if (bool2) {}
            }
            label506:
            label507:
            bool1 = e(paramDouble);
            if ((!bool2) && (i2 == 0)) {
              break label584;
            }
          }
        }
        if (!bool2) {
          if (d(paramDouble))
          {
            if (bool2) {
              break label578;
            }
            if (d1 <= 4.71238898038469D) {
              break label577;
            }
          }
        }
        if ((bool2) || (e(paramDouble))) {
          if (bool2) {}
        }
        label577:
        label578:
        bool1 = d1 > 4.71238898038469D;
        label584:
        d2 = paramzc.b() + paramzc.d() + 5.0D + localt.c() * 0.5D;
        if (!bool2) {
          if (d2 > localw2.b) {
            d2 = localw2.b;
          }
        }
        d3 = bool1 ? Math.min(localw1.a, localw2.a) - localt.a : Math.max(localw1.a, localw2.a) + localt.a;
        if (!bool2) {
          localo.g(d3, d2);
        }
        localw4 = i1 != 0 ? localo.l() : a(a.d.o.a(localo), paramn);
        localw5 = a(paramn, localw4, 1.0D, 0.0D);
        localo.f(localw5.a - localw4.a, 0.0D);
        if (bool2) {
          break label1461;
        }
        if (i1 != 0) {
          break label1435;
        }
        d4 = a(paramn, new a.d.z(1.0D, 0.0D), Math.abs(paramDouble));
        if (!bool2)
        {
          if (!bool1) {
            d4 = -d4;
          }
          localo.f(d4, 0.0D);
        }
        if (bool2) {
          break label1461;
        }
        if (i2 == 0) {
          break label1435;
        }
      }
    }
    if (!bool2)
    {
      if (paramByte == 2)
      {
        if (!bool2) {
          if (this.l)
          {
            if (!bool2) {
              if (paramBoolean)
              {
                if (bool2) {
                  break label883;
                }
                if (e(paramDouble)) {
                  break label882;
                }
              }
            }
            if ((bool2) || (!paramBoolean)) {
              if (bool2) {}
            }
            label882:
            label883:
            bool1 = d(paramDouble);
            if ((!bool2) && (i2 == 0)) {
              break label906;
            }
          }
        }
        bool1 = e(paramDouble);
        label906:
        d2 = paramzc.a() - 5.0D - localt.b() * 0.5D;
        if (!bool2) {
          if (d2 < localw2.a) {
            d2 = localw2.a;
          }
        }
        d3 = bool1 ? Math.max(localw1.b, localw2.b) + localt.b : Math.min(localw1.b, localw2.b) - localt.b;
        if (!bool2) {
          localo.g(d2, d3);
        }
        localw4 = i1 != 0 ? localo.l() : a(a.d.o.a(localo), paramn);
        localw5 = a(paramn, localw4, 0.0D, 1.0D);
        localo.f(0.0D, localw5.b - localw4.b);
        if (bool2) {
          break label1461;
        }
        if (i1 == 0)
        {
          d4 = a(paramn, new a.d.z(0.0D, 1.0D), Math.abs(paramDouble));
          if (!bool2)
          {
            if (bool1) {
              d4 = -d4;
            }
            localo.f(0.0D, d4);
          }
          if (bool2) {
            break label1461;
          }
          if (i2 == 0) {}
        }
      }
      else
      {
        if (bool2) {
          break label1461;
        }
      }
    }
    else if (paramByte == 3)
    {
      if (!bool2) {
        if (this.l)
        {
          if (!bool2) {
            if (paramBoolean)
            {
              if (bool2) {
                break label1197;
              }
              if (d(paramDouble)) {
                break label1196;
              }
            }
          }
          if ((bool2) || (!paramBoolean)) {
            if (bool2) {}
          }
          label1196:
          label1197:
          bool1 = e(paramDouble);
          if ((!bool2) && (i2 == 0)) {
            break label1220;
          }
        }
      }
      bool1 = e(paramDouble);
      label1220:
      d2 = paramzc.a() + paramzc.c() + 5.0D + localt.b() * 0.5D;
      if (!bool2) {
        if (d2 > localw2.a) {
          d2 = localw2.a;
        }
      }
      d3 = bool1 ? Math.max(localw1.b, localw2.b) + localt.b : Math.min(localw1.b, localw2.b) - localt.b;
      if (!bool2) {
        localo.g(d2, d3);
      }
      localw4 = i1 != 0 ? localo.l() : a(a.d.o.a(localo), paramn);
      localw5 = a(paramn, localw4, 0.0D, 1.0D);
      localo.f(0.0D, localw5.b - localw4.b);
      if (bool2) {
        break label1461;
      }
      if (i1 == 0)
      {
        d4 = a(paramn, new a.d.z(0.0D, 1.0D), Math.abs(paramDouble));
        if (!bool1) {
          d4 = -d4;
        }
        localo.f(0.0D, d4);
      }
    }
    label1435:
    if (!bool2) {
      if (w.a(localo.l(), localw1) > w.a(localo.l(), localw2))
      {
        label1461:
        w localw3 = new w((localw1.a + localw2.a) / 2.0D, (localw1.b + localw2.b) / 2.0D);
        if (!bool2)
        {
          if (paramBoolean) {
            a(localo, paramn, localw3, paramDouble);
          }
        }
        else {
          if (i2 == 0) {
            break label1558;
          }
        }
        n localn = new n(paramn.e(), paramn.d());
        a(localo, localn, localw3, paramDouble);
      }
    }
    label1558:
    return localo.c();
  }
  
  private static boolean d(double paramDouble)
  {
    boolean bool = o.eg;
    if (!bool) {
      if (paramDouble <= 0.0D)
      {
        if ((!bool) && (paramDouble != 0.0D)) {
          break label41;
        }
        if (bool) {
          break label38;
        }
      }
    }
    label38:
    label41:
    return Double.doubleToLongBits(paramDouble) == 0L;
  }
  
  private static boolean e(double paramDouble)
  {
    boolean bool = o.eg;
    if (!bool) {
      if (paramDouble >= 0.0D)
      {
        if ((!bool) && (paramDouble != 0.0D)) {
          break label41;
        }
        if (bool) {
          break label38;
        }
      }
    }
    label38:
    label41:
    return Double.doubleToLongBits(paramDouble) < 0L;
  }
  
  private static double a(n paramn, a.d.z paramz, double paramDouble)
  {
    boolean bool = o.eg;
    double d1 = a.d.z.d(paramn.i(), paramz);
    if (!bool)
    {
      if (d1 == 1.570796326794897D) {
        return paramDouble;
      }
      if (bool) {}
    }
    else if (d1 > 1.570796326794897D)
    {
      d1 = 3.141592653589793D - d1;
    }
    return paramDouble / Math.sin(d1);
  }
  
  private static w a(w[] paramArrayOfw, n paramn)
  {
    return paramArrayOfw[b(paramArrayOfw, paramn)];
  }
  
  private static int b(w[] paramArrayOfw, n paramn)
  {
    int i3 = o.dg;
    double d1 = 1.7976931348623157E+308D;
    int i1 = -1;
    int i2 = 0;
    do
    {
      if (i2 >= paramArrayOfw.length) {
        break;
      }
      double d2 = a(paramn, paramArrayOfw[i2]);
      if (i3 != 0) {
        break label61;
      }
      if (d2 < d1)
      {
        i1 = i2;
        d1 = d2;
      }
      i2++;
    } while (i3 == 0);
    label61:
    return i1;
  }
  
  private static double a(n paramn, w paramw)
  {
    w localw1 = paramn.d();
    w localw2 = paramn.e();
    double d1 = localw2.a - localw1.a;
    double d2 = localw2.b - localw1.b;
    double d3 = paramw.a - localw1.a;
    double d4 = paramw.b - localw1.b;
    double d5 = d3 * d1 + d4 * d2;
    double d6 = d5 * d5 / (d1 * d1 + d2 * d2);
    double d7 = d3 * d3 + d4 * d4 - d6;
    if (!o.eg) {
      if (d7 < 0.0D) {
        d7 = 0.0D;
      }
    }
    return Math.sqrt(d7);
  }
  
  private static w a(w paramw1, n paramn, w paramw2)
  {
    double d1 = paramw1.a();
    double d2 = paramw1.b();
    w localw1 = paramn.d();
    w localw2 = paramn.e();
    double d3 = localw2.a() - localw1.a();
    double d4 = localw2.b() - localw1.b();
    double d5 = paramw2.a();
    double d6 = paramw2.b();
    double d7 = -d4;
    double d8 = d3;
    return k.a(d1, d2, d1 + d3, d2 + d4, d5, d6, d5 + d7, d6 + d8);
  }
  
  private static w a(w paramw1, n paramn1, w paramw2, n paramn2)
  {
    double d1 = paramw1.a();
    double d2 = paramw1.b();
    w localw1 = paramn1.d();
    w localw2 = paramn1.e();
    double d3 = localw2.a() - localw1.a();
    double d4 = localw2.b() - localw1.b();
    double d5 = paramw2.a();
    double d6 = paramw2.b();
    w localw3 = paramn2.d();
    w localw4 = paramn2.e();
    double d7 = localw4.a() - localw3.a();
    double d8 = localw4.b() - localw3.b();
    return k.a(d1, d2, d1 + d3, d2 + d4, d5, d6, d5 + d7, d6 + d8);
  }
  
  private static w a(n paramn, w paramw, double paramDouble1, double paramDouble2)
  {
    w localw1 = paramn.e();
    w localw2 = paramn.d();
    double d1 = paramw.a();
    double d2 = paramw.b();
    return k.a(localw1.a(), localw1.b(), localw2.a(), localw2.b(), d1, d2, d1 + paramDouble1, d2 + paramDouble2);
  }
  
  public static class a_
  {
    private final int a;
    private final double c;
    private final boolean e;
    public static int f;
    
    public a_(int paramInt, double paramDouble, boolean paramBoolean)
    {
      this.a = paramInt;
      this.c = paramDouble;
      this.e = paramBoolean;
    }
    
    public int a()
    {
      return this.a;
    }
    
    public double b()
    {
      return this.c;
    }
    
    public boolean c()
    {
      return this.e;
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.id

 * JD-Core Version:    0.7.0.1

 */